﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ValidBox4Mvc.ValidRules;


namespace WebApp.Models
{
    [Serializable]
    public class UserInfo
    {
        public int Id { get; set; }

        [Required(ErrorMessage = "名称为必填项")]
        [Length(2, 4, ErrorMessage = "名称为{0}到{1}个字")]
        [Remote("/home/CheckName", "Id", "Name")]
        public string Name { get; set; }

        [Required(ErrorMessage = "邮箱为必填项")]
        [Email]
        [MaxLength(15)]
        public string Email { get; set; }
    }
}